fix: API key on /search + client-side rate limiting (#155, #154)#156
fix: API key on /search + client-side rate limiting (#155, #154)#156deucebucket merged 5 commits intodevelopfrom
Conversation
🔍 Vibe Check ReviewContextPR #156 adds API key authentication to Codebase Patterns I Verified
✅ Good
🚨 Issues Found
📋 Scope Verification
Scope Status: SCOPE_PARTIAL Critical Missing Pieces:
📝 Documentation CheckCHANGELOG.md: ❌ MISSING - This is a
🎯 VerdictREQUEST_CHANGES Blocking Issues:
Required Fixes:
Non-Blocking Recommendations:
|
2896980 to
e00252d
Compare
🔍 Vibe Check ReviewContextPR #156 fixes API key authentication missing on Codebase Patterns I Verified
✅ Good
🚨 Issues Found
📋 Scope Verification
Scope Status: SCOPE_PARTIAL What's Missing from #154:
📝 Documentation CheckCHANGELOG.md: ❌ MISSING This is a ## [0.9.0-beta.XXX] - 2026-02-XX
### Fixed
- **Issue #155: API key not sent on /search requests** - All Skaldleita API endpoints now include authentication headers. Previously GET /search requests were missing the X-API-Key header, causing 403 Forbidden errors.
- **Issue #154: Rate limit handling** - Server 429 responses now display retry countdown to users with toast notifications. Backend respects Retry-After header with exponential backoff fallback.🎯 VerdictREQUEST_CHANGES Required Fixes:
Recommended Fixes: About Scope:
|
🔍 Vibe Check ReviewContextThis PR fixes API key authentication issues on Codebase Patterns I Verified
✅ Good
🚨 Issues Found
📋 Scope Verification
Scope Status: SCOPE_OK 📝 Documentation Check
🎯 VerdictREQUEST_CHANGES Critical issue to fix:
Recommended improvements: |
🔍 Vibe Check ReviewContextPR #156 fixes missing API key authentication on Codebase Patterns I Verified
✅ Good
🚨 Issues Found
📋 Scope Verification
Scope Status: SCOPE_OK - Both issues fully addressed with proper implementation 📝 Documentation Check
🎯 VerdictREQUEST_CHANGES - Fix these critical issues before merge:
The core implementation is excellent - great refactoring and proper handling of both issues. However, the missing import will cause an immediate After fixing the import, this is a solid PR that properly addresses both linked issues with good code quality. |
🔍 Vibe Check ReviewContextPR #156 addresses two issues: (1) missing API key headers on Codebase Patterns I Verified
✅ Good
🚨 Issues Found
📋 Scope Verification
Scope Status: SCOPE_OK - Both issues fully addressed 📝 Documentation Check
🎯 VerdictREQUEST_CHANGES Items to fix:
The centralized rate limiting implementation is solid, but the missing error handling around the network request could cause user-facing errors. Once those two items are addressed, this is good to merge. |
🔍 Vibe Check ReviewContextThis PR addresses two related issues: adding the missing Codebase Patterns I VerifiedI examined the existing codebase to understand patterns:
✅ Good
🚨 Issues Found
Update on MEDIUM issue after re-reading: Looking at lines 3077-3081 in the diff: secrets = load_secrets()
api_key = secrets.get('bookdb_api_key') or BOOKDB_PUBLIC_KEY
headers = get_signed_headers() or {}
headers['X-API-Key'] = api_keyThis is CORRECT - the API key is added on line 3080 after creating headers. The 📋 Scope Verification
Scope Status: SCOPE_OK Both issues fully addressed:
📝 Documentation Check
🎯 VerdictAPPROVE This is clean, defensive code that properly addresses both linked issues:
No blocking issues found. The code follows existing patterns, includes proper error handling, and improves maintainability by eliminating duplication. |
Summary
X-API-Keyheader to all Skaldleita/searchrequests (was only sent on/match). Updates bothsearch_bookdb_api()pipeline function and the manual search route. Fixes 403 Forbidden errors since Skaldleita now requires auth on all endpoints.handle_rate_limit_response()utility inrate_limiter.pywith exponential backoff (30s→60s→120s),Retry-Afterheader parsing, and circuit breaker integration. Applied tobookdb.pyandfingerprint.py. Frontend shows inline rate limit warnings on library, queue, and history pages.Test plan
/searchrequests now include API key (check Skaldleita server logs)test-naming-issues.py(281/281 pass)ruff check --select=F821clean